interface Person {
  getUserName(): string;
}

class User implements Person {
  getUserName(): string {
    return "John Doe";
  }
}

const user = new User();
console.log(user.getUserName());

function getUserName(person: Person): string {
  return person.getUserName();
}

getUserName(user);
